package com.ruoyi.myplayer.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.myplayer.mapper.PlayerAlbumMapper;
import com.ruoyi.myplayer.domain.PlayerAlbum;
import com.ruoyi.myplayer.service.IPlayerAlbumService;

/**
 * 专辑Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-09
 */
@Service
public class PlayerAlbumServiceImpl implements IPlayerAlbumService 
{
    @Autowired
    private PlayerAlbumMapper playerAlbumMapper;

    /**
     * 查询专辑
     * 
     * @param id 专辑主键
     * @return 专辑
     */
    @Override
    public PlayerAlbum selectPlayerAlbumById(Long id)
    {
        return playerAlbumMapper.selectPlayerAlbumById(id);
    }

    /**
     * 查询专辑列表
     * 
     * @param playerAlbum 专辑
     * @return 专辑
     */
    @Override
    public List<PlayerAlbum> selectPlayerAlbumList(PlayerAlbum playerAlbum)
    {
        return playerAlbumMapper.selectPlayerAlbumList(playerAlbum);
    }

    /**
     * 新增专辑
     * 
     * @param playerAlbum 专辑
     * @return 结果
     */
    @Override
    public int insertPlayerAlbum(PlayerAlbum playerAlbum)
    {
        return playerAlbumMapper.insertPlayerAlbum(playerAlbum);
    }

    /**
     * 修改专辑
     * 
     * @param playerAlbum 专辑
     * @return 结果
     */
    @Override
    public int updatePlayerAlbum(PlayerAlbum playerAlbum)
    {
        return playerAlbumMapper.updatePlayerAlbum(playerAlbum);
    }

    /**
     * 批量删除专辑
     * 
     * @param ids 需要删除的专辑主键
     * @return 结果
     */
    @Override
    public int deletePlayerAlbumByIds(Long[] ids)
    {
        return playerAlbumMapper.deletePlayerAlbumByIds(ids);
    }

    /**
     * 删除专辑信息
     * 
     * @param id 专辑主键
     * @return 结果
     */
    @Override
    public int deletePlayerAlbumById(Long id)
    {
        return playerAlbumMapper.deletePlayerAlbumById(id);
    }
}
